package com.ruoyi.web.controller.bussiness;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.entity.po.TPlayerTweetsComments;
import com.ruoyi.service.IPlayerTweetsCommentsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * 选手动态评价(t_player_tweets_comments)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/playerTweetsComments")
@Api(tags = "PC-10.选手动态评价")
public class PlayerTweetsCommentsController extends BaseController {
    /**
     * 服务对象
     */
    @Autowired
    private IPlayerTweetsCommentsService playerTweetsCommentsService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    @ApiOperation("查询选手动态评价")
    public TPlayerTweetsComments selectOne(Integer id) {
        return playerTweetsCommentsService.selectByPrimaryKey(id);
    }

    @PostMapping("/add")
    @ApiOperation("新增选手动态评价")
    public AjaxResult add(@RequestBody TPlayerTweetsComments tPlayerTweetsComments) {
        return toAjax(playerTweetsCommentsService.insert(tPlayerTweetsComments));
    }

    @GetMapping("/list")
    @ApiOperation("查询选手动态评价列表")
    public TableDataInfo list(TPlayerTweetsComments tPlayerTweetsComments) {
        return getDataTable(playerTweetsCommentsService.selectList(tPlayerTweetsComments));
    }



}
